/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.appspot.nnaplanner;

import com.appspot.nnaplanner.DAL.DALConnection;
import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 *
 * @author david
 */
public class Connection {
    private Stop _current;
    private Stop _destination;
    private List<Date> _times;
    private List<Integer> _durations;
    private List<String> _descriptions;


    public Connection(Stop s, List<Date> d) {
        _current = s;
        _times = d;
    }

    public List<Date> GetDepartureTimes() {
        return _times;
    }

    public Stop getCurrent() {
        return _current;
    }

    public Stop getDestination() {
        return _destination;
    }

    public void save() throws Exception {
        DALConnection dc = new DALConnection();
        //dc.setDestination(_destination);
        dc.setStop(_current.getID());
        dc.setDepartures(_times, _durations, _descriptions);
        //dc.save(dc);
    }
}
